x86,irq: Clean up __clear_irq_vector
authorKeir Fraser <keir@xen.org>
Fri, 30 Sep 2011 20:15:21 +0000 (21:15 +0100)
committerKeir Fraser <keir@xen.org>
Fri, 30 Sep 2011 20:15:21 +0000 (21:15 +0100)
commit3a5a642a938cafc3e9eebd975b223e14610416e2
tree941d5092b63045f9b0010af2859e3653278b2425
parent10fd868e6ca92ac42057cb53199922b7ae13ba9c
x86,irq: Clean up __clear_irq_vector

Fix and clean up the logic to __clear_irq_vector().

We always need to clear the things related to cfg->vector.

If the IRQ is currently in motion, then we need to also clear
out things related to cfg->old_vector.

This patch reorganizes the function to make the parallels between
the two clean-ups more obvious.

The main functional change here is with cfg->used_vectors; make
sure to clear cfg->vector always (even if !cfg->move_in_progress);
if cfg->move_in_progress, clear cfg->old_vector as well.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/irq.c